<?php

session_start(); 

$streznik = $_SERVER["HTTP_HOST"];  
			
$pot = rtrim(dirname($_SERVER["PHP_SELF"]), "/\\");

 if (!isset($_SESSION['uporabnik'])) {
    header( "Location: http://".$streznik."".$pot."/index.php" );
 } else if (isset($_SESSION['uporabnik']))
?>